﻿@{
    kxcxw.Data.Common.CommonRepositories comm = new kxcxw.Data.Common.CommonRepositories();
    var menuList = comm.getProductCategoryList();
    var sitelogolist = comm.getWebSiteList();
}
@*class="active"*@
<div id="page" class="tree">
    <div class="PartA">
        <div id="Categorytree" class="nav">
            <div class="treeheader">
            </div>
            <ul id="Product" style="@(ViewBag.isFloat == "true" ? "display:none" : "")">
                @foreach (var item in menuList.Where(q => q.ItemDeitalPID == null))
                {
                    string toppx = "0px";
                    if (item.ItemDeitalID == "E3CD5E9D-3444-4729-B3C2-EEFB91E76EC9")
                    {
                        //电子数码
                        toppx = "237px";
                    }
                    <li class=""><span>
                        @item.itemDetialName
                        <s class="sign"></s></span>
                        <div class="show_sort" style="top:@toppx;">
                            <div class="show_sort_l">
                                @foreach (var m2 in menuList.Where(q => q.ItemDeitalPID == item.ItemDeitalID))
                                {
                                    <dl style="top: 5px;" onclick="window.location='@(Url.Action("ProductList", "Home", new { categoryId = m2.ItemDeitalID, typeId = ViewData["type"] }, null))'">
                                        <dt>
                                            @Html.ActionLink(m2.itemDetialName, "ProductList", "Home", new { categoryId = m2.ItemDeitalID, typeId = ViewData["type"] }, null)</dt>
                                        <dd>@m2.Description</dd>
                                    </dl>
                                }
                            </div>
                        </div>
                    </li>
                    
                                ViewData["dlCount"] = (Convert.ToInt32(ViewData["dlCount"]) + 1).ToString();
                }
                <li class="end"><span>大站导航 <s class="sign"></s></span>
                    <div class="show_sort" style="top:100px;">
                        <div class="show_sort_l" style="padding: 10px;">
                            <h4>
                                热门网站</h4>
                            <ol class="sitelogolist">
                                @foreach (var m2 in sitelogolist)
                                {
                                    <li><a href="@Url.Action("SiteList", "Home", new { SiteId = m2.ItemDeitalID })">
                                        <img src="@Url.Content("~/Content/Upload/SiteLogo/" + m2.ImgInfo)" title=""></a>
                                    </li>
                                }
                            </ol>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#Product li").hover(function () {
            $(this).attr("class", "active");
            $(this).find("div.show_sort").show();
        },
        function () {
            $(this).attr("class", "");
            $(this).find("div.show_sort").hide();
        });
    });
</script>
